home *** CD-ROM | disk | FTP | other *** search
/ PC Users 1999 May / Cd Pc Users extra 20 mayo 1999.iso / Prog / Inst / FTP / INFO.C < prev    next >
Encoding:
C/C++ Source or Header  |  1999-03-18  |  861 b   |  40 lines

  1. /*** info.c ***/
  2.  
  3. #include "windows.h"
  4. #include <string.h>
  5. #include "fce.h"
  6. #include "info.h"
  7. #include "message.h"
  8.  
  9. extern HWND hInfoWnd;
  10.  
  11. static char InfoText[32];
  12. void Message(LPSTR);
  13.  
  14. void InfoFileMsg(long Size)
  15. {
  16.  wsprintf((LPSTR)InfoText,"%ld bytes. ",Size);
  17. }
  18.  
  19. long FAR PASCAL InfoWndProc(HWND hWnd,UINT iMessage, UINT wParam, LONG lParam)
  20. {HDC  hDC;
  21.  hInfoWnd = hWnd;
  22.  switch(iMessage)
  23.    {case WM_USER:
  24.       hDC = GetDC(hInfoWnd);
  25.       SetMapMode(hDC,MM_ANISOTROPIC);
  26.       SelectObject(hDC, GetStockObject(OEM_FIXED_FONT) );
  27.       TextOut(hDC, 2,  2, (LPSTR)InfoText, lstrlen(InfoText) );
  28.       ReleaseDC(hInfoWnd,hDC);
  29.       break;
  30.      
  31.     case WM_DESTROY:
  32.       PostQuitMessage(0);
  33.       break;
  34.     default:
  35.       return DefWindowProc(hInfoWnd,iMessage,wParam,lParam);
  36.    } /* end switch */
  37.  return 0L;
  38.  
  39.